#include "../car_creater_info.h"
#include "sliding_action.h"
#include <iostream>
int main(int argc, char** argv) {
    sliding_action action;
    action.update() ;
    action.update() ;
    action.set_action(0) ;
    action.update() ;
    action.update() ;
    action.set_action(1) ;
    action.update() ;
    action.set_action(2) ;
    action.update() ;
    action.update() ;
    action.set_action(3) ;
    
    
    /*
    car_creater_info info ;
    init(info) ;
    info.Gravity = hkVector4(0.0f, -9.8f, 0.0f) ;
    if(write_to_file(info, "test.bin", true)) {
        std::cout << "write to file ok!" << std::endl ;
    } else {
        std::cout << "write to file failed" << std::endl ;
        exit(0) ;
    }

    car_creater_info info2 ;
    if(read_from_file(info2, "test.bin", true)) {
        std::cout << "read from file ok" << std::endl ;
        std::cout << info2.Gravity(0) << " " <<
            info2.Gravity(1) << " " <<
            info2.Gravity(2) << std::endl ;
    } else {
        std::cout << "read error" << std::endl ;
        exit(0) ;
    }

    if(write_to_file(info2, "test.bin", true)) {
        std::cout << "rewrite ok!\n" ;
    } else {
        std::cout << "error rewrite" << std::endl ;
    }

    if(write_to_file(info2, "test.txt", false)) {
        std::cout << "write to text ok\n" ;
    } else {
        std::cout << "error write to text" << std::endl ;
        exit(0) ;
    }

    car_creater_info info3 ;
    if(read_from_file(info3, "test.txt", false)) {
        std::cout << "read from text ok\n" ;
        std::cout << "gravity : " << info3.Gravity(0) << " "
                  << info3.Gravity(1) << " "
                  << info3.Gravity(2) << std::endl ;
    } else {
        std::cout << "error read from text" << std::endl ;
        exit(0) ;
    }
    */

    return 0 ;
}

    
